﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Aj.Core;

public partial class Manager_systeminfo : AuthPageBase
{
    protected override void OnLoad(EventArgs e)
    {
        base.OnLoad(e);
        try
        {
            if (QueryParam("act").IsNotNullAndEmpty())
            {
                switch (QueryParam("act"))
                {
                    case "updatanewsxml":
                        Utility.InitNewsXml();
                        break;
                    case "updatavideoxml":
                        Utility.InitNews2Xml();
                        break;
                }
            }
            LoadSystemInf();
        }
        catch (Exception ex)
        {
            Utility.WriteErrorLog(ex);
        }
    }

    protected void LoadSystemInf()
    {
        //#region 检测系统信息

        //Response.Expires = 0;
        //Response.CacheControl = "no-cache";

        ////取得页面执行开始时间
        //DateTime stime = DateTime.Now;

        ////取得服务器相关信息
        //servername.Text = Server.MachineName;
        //serverip.Text = Request.ServerVariables["LOCAL_ADDR"];
        //server_name.Text = Request.ServerVariables["SERVER_NAME"];

        //int build, major, minor, revision;
        //build = Environment.Version.Build;
        //major = Environment.Version.Major;
        //minor = Environment.Version.Minor;
        //revision = Environment.Version.Revision;
        //servernet.Text = ".NET CLR  " + major + "." + minor + "." + build + "." + revision;
        //serverms.Text = Environment.OSVersion.ToString();

        //serversoft.Text = Request.ServerVariables["SERVER_SOFTWARE"];
        //serverport.Text = Request.ServerVariables["SERVER_PORT"];
        //serverout.Text = Server.ScriptTimeout.ToString();
        ////语言应该是浏览者信息, 1.0 final 修改
        //cl.Text = Request.ServerVariables["HTTP_ACCEPT_LANGUAGE"];
        //servertime.Text = DateTime.Now.ToString();
        ////serverppath.Text = Request.ServerVariables["APPL_PHYSICAL_PATH"];
        //servernpath.Text = Request.ServerVariables["PATH_TRANSLATED"];
        //serverhttps.Text = Request.ServerVariables["HTTPS"];

        ////取得用户浏览器信息
        //HttpBrowserCapabilities bc = Request.Browser;
        //ie.Text = bc.Browser.ToString();
        //cookies.Text = bc.Cookies.ToString();
        //frames.Text = bc.Frames.ToString();
        //javaa.Text = bc.JavaApplets.ToString();
        //javas.Text = bc.EcmaScriptVersion.ToString();
        //ms.Text = bc.Platform.ToString();
        //vbs.Text = bc.VBScript.ToString();
        //vi.Text = bc.Version.ToString();

        ////取得浏览者ip地址,1.0 final 加入
        //cip.Text = Utility.GetIP();//Request.ServerVariables["REMOTE_ADDR"]

        ////取得页面执行结束时间
        //DateTime etime = DateTime.Now;

        ////计算页面执行时间
        //runtime.Text = ((etime - stime).TotalMilliseconds).ToString();

        //#endregion
    }
}